//package com.example.demo.demos.pojo;
//
//import lombok.Data;
//import org.springframework.data.annotation.Id;
//import org.springframework.data.elasticsearch.annotations.Document;
//import org.springframework.data.elasticsearch.annotations.Field;
//import org.springframework.data.elasticsearch.annotations.FieldType;
//
//@Data
//@Document(indexName = "product") // 指定索引名称
//public class Product {
//    @Id
//    private String id;
//
//    @Field(type = FieldType.Text, analyzer = "ik_max_word") // 使用IK分词器
//    private String name;
//
//    @Field(type = FieldType.Keyword) // 精确匹配
//    private String category;
//
//    @Field(type = FieldType.Double)
//    private Double price;
//}